<!------------------------------------------------->
<!-------------------head ----------------------->
<!------------------------------------------------->

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Defect Tracking System</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.4.2/pure-min.css">
</head>
<body>
            
<center>
<br>
<div class="pure-g">
	<style scoped>
        .button-secondary {
            color: white;
            border-radius: 4px;
            text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
        }
        .button-secondary {
            background: rgb(66, 184, 221); /* this is a light blue */
        }

	</style>
	
    <div class="pure-u-1-3"> </div>
    <div class="pure-u-1-3">
    	<button class="button-secondary pure-button">Defect Tracking System</button> 
    </div>
    <div class="pure-u-1-3"> Team B </div>
</div>
<br><br>
<!------------------------------------------------->
<!-------------------head ----------------------->
<!------------------------------------------------->

<u><h3>List of Defects</h3></u>

<!------------------------------------------------->
<!-------------------list of table ----------------------->
<!------------------------------------------------->

<table class="pure-table"  width="700">
    <thead>
        <tr>
            <th>#</th>
            <th width="65%" align="center">Content</th>
            <th align="center">Date</th>
            <th align="center">assigner</th>
        </tr>
    </thead>

    <tbody>
   <%@page import="java.util.*" %>
   <%@page import="com.DefectTracking.Defect" %>
    
   <% ArrayList<Defect> d =new ArrayList<Defect>(); 	
    	d = (ArrayList<Defect>)session.getAttribute("defect_list"); 
	int countOdd=0;
    	for(Defect defect : d) {
    		if (countOdd++ % 2 == 0) {
    			out.println("<tr>");
    		} else {
    			out.println("<tr class='pure-table-odd'>");
		}
    		out.println("<td align='center'>"+defect.getDefectID()+"</td>");
    		out.println("<td align='center'>"+defect.getSummary()+"</td>");
    		out.println("<td align='center'>"+defect.getDetails()+"</td>");
    		out.println("<td align='center'>"+defect.getDetectedBy()+"</td>");
    		out.println("<td align='center'>"+defect.getDetectedOn()+"</td>");
    		out.println("<td align='center'>"+defect.getStatusID()+"</td>");
    		out.println("<td align='center'>"+defect.getProjectID()+"</td>");
    		out.println("<td align='center'>"+defect.getClosedDate()+"</td>");
    		out.println("</tr>");
	}

    	%>

    </tbody>
</table>

<!------------------------------------------------->
<!------------------- create account/login ----------------------->
<!------------------------------------------------->
</br></br></br>
<a class="pure-button pure-button-primary" href="./submit_defect_proc.jsp">Submit New Defect</a>

	
	</br>

</center>
</body>
</html>